---
layout: "default"
title: "zip"
description: "Swift documentation for 'zip': A sequence of pairs built out of two underlying sequences, where
the elements of the ith pair are the ith elements of each
underlying sequence."
keywords: "zip,func,swift,documentation"
root: "/v2.1"
---

<div class="declaration" id="func-zip-sequence1_-sequencetype-sequence2_-sequencetype_-sequence1_-sequence2">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-zip-sequence1_-sequencetype-sequence2_-sequencetype_-sequence1_-sequence2">func <wbr>zip&lt;Sequence1 :<wbr> SequenceType, Sequence2 : SequenceType&gt;(<wbr>_:<wbr> Sequence1, _: Sequence2)</a>
        
<div class="comment collapse" id="comment-func-zip-sequence1_-sequencetype-sequence2_-sequencetype_-sequence1_-sequence2"><div class="p">
    <p>A sequence of pairs built out of two underlying sequences, where
the elements of the <code>i</code>th pair are the <code>i</code>th elements of each
underlying sequence.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">func zip&lt;Sequence1 : SequenceType, Sequence2 : SequenceType&gt;(sequence1: Sequence1, _ sequence2: Sequence2) -&gt; Zip2Sequence&lt;Sequence1, Sequence2&gt;</code>
    
    
</div></div>
</div>
